{{ extend '../_layouts/home.html' }}

{{ block 'title' }}{{ '关注的用户' }}{{ /block }}

{{ block 'body' }} 
<section class="container">
    {{ include '../_partials/setting-avatar.html' }}
    <div class="col-md-9">
        <div class="list-container">
            <ul class="list-tab">
                <li><a href="/settings/profile">个人主页</a></li>
                <li><a href="/myFollow" class="active">关注</a></li>
                <li><a href="/myFans">粉丝</a></li>
                <li><a href="/myCollection">收藏</a></li>
                <li><a href="/settings/admin">修改密码</a></li>
                <li><a href="/settings/createdTopics">已创建话题</a></li>
                <li><a href="/settings/partTopics">已参与话题</a></li>
            </ul>    
        </div>
        <div class="bg3Color margintop">
            <div class="user_header">
                <ul class="breadcrumb">
                    <li>我的关注</li>
                    <span id="follow_num" class="dis-block pullme-right"></span>
                </ul>
            </div>
            {{ if follow != '' }}
            <div class="follow-container">
                <ul class="follow-list">
                    {{ each follow fol }}
                    <li class="follow-list-item">
                        <div class="user_block">
                            <a href="/settings/{{ fol.followuser[0].nickname }}" class="mypng"><img src="{{ fol.followuser[0].avatar }}" alt=""></a>
                            <a href="/settings/{{ fol.followuser[0].nickname }}">{{ fol.followuser[0].nickname }}</a>
                        </div>
                        <a href="/follow/deleteById/{{ formateId(fol._id) }}" class="remove_follow">取消关注</a>
                    </li>
                    {{ /each }}
                </ul>
            </div>
            {{ else }}
            <div class="follow-container">
                <div class="follow_nothing">
                    <div>
                        <img src="/public/img/no.png" alt="">
                        <p class="discrible_text">您暂时没有关注哦</p>
                    </div>
                </div>
            </div>
            {{ /if }}
        </div>
    </div>
</section>
{{ /block }}
{{ block 'script' }}
<script>
$(function () {
    $('#follow_num').text('共' + $('.follow-list-item').length + '人')
})
</script>
{{ /block }}
